<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2019/2/23
 * Time: 11:05
 */

namespace app\api\model;


class WorkUserProduct extends BaseModel
{
    protected $autoWriteTimestamp = true;

    /**
     * 创建商品码
     * @param $data
     * @return $this
     */
    public static function createProductImg($data){
        return self::create($data);
    }

    /**
     * c查询商品码
     * @param $wu_id
     * @param $product_id
     * @return array|false|\PDOStatement|string|\think\Model
     */
    public static function getProductImgByInfo($wu_id,$product_id){
        $status = self::where('wu_id','=',$wu_id)
                    ->where('product_id','=',$product_id)->find();
        return $status;
    }

}